import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
export default pinia // 默认导出

import userStore from './modules/user'
import consultStore from './modules/consult'
// 这个函数按需导出 推荐hook函数都使用use开头
export const useStore = () => {
  return {
    user: userStore(),
    consult: consultStore()
  }
}
